Skip to content

[material_ui, cupertino_ui] Fix API doc references - #12274

Merged
auto-submit[bot] merged 4 commits into
flutter:mainfrom
Piinks:docRefs
Jul 28, 2026
Merged

[material_ui, cupertino_ui] Fix API doc references#12274
auto-submit[bot] merged 4 commits into
flutter:mainfrom
Piinks:docRefs

Conversation

@Piinks

@Piinks Piinks commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Fix doc references in material_ui and cupertino_ui
Towards flutter/flutter#189629

I also commented out youtube directives since they do not work outside of the SDK.

There are some references we cannot fix in the design packages themselves, largely due tot he fact that material_ui and cupertino_ui export the widgets library. That pulls in doc references from the widgets library that cannot be resolved outside of the scope of the SDK.

We can change the doc upstream in the SDK, but that feel like a poor choice to make the docs less helpful in the SDK in order to resolve a reference issue in a downstream package.
Something we are planning for after the initial 1.0 is to remove the export of widgets from both packages, which will resolve the remaining issues.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@Piinks
Piinks requested review from dkwingsmt and justinmc July 22, 2026 21:49
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 22, 2026
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces documentation macros with inline documentation for scrollbars and primary scroll views, adds @docImport statements, and comments out {@youtube} directives. Feedback from the reviewer indicates that using // instead of /// to comment out the youtube directives breaks Dart's documentation comment blocks, detaching preceding documentation from their declarations. The reviewer suggests using /// and removing the @ symbol to keep the comment blocks contiguous.

Comment thread packages/cupertino_ui/lib/cupertino_ui.dart Outdated
Comment thread packages/material_ui/lib/material_ui.dart Outdated
Comment thread packages/cupertino_ui/lib/src/activity_indicator.dart Outdated
/// visible.
///
/// {@macro flutter.widgets.Scrollbar}
/// By default, the thumb will fade in and out as the child scroll view

@dkwingsmt dkwingsmt Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change and alike duplicate with #12271 . While I'm leaning towards my approach, I'm ok with either, and let me know what you think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha gotcha, sorry I missed that. It has given me a new idea for the youtube ones too. I prefer your solution, I will revert those duped instances here.

@github-actions github-actions Bot added the triage-framework Should be looked at in framework triage label Jul 22, 2026
@Piinks

Piinks commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the {@youtube} directive with standard text links to the Flutter YouTube channel across various Cupertino and Material widgets, and adds @docImport directives to several library files. Feedback on the changes identifies typos using four slashes (////) instead of three (///) for documentation comments in scrollbar.dart and reorderable_list.dart. Additionally, incorrect widget references were noted in the documentation comments for sheet.dart and scaffold.dart.

Comment thread packages/cupertino_ui/lib/src/scrollbar.dart Outdated
Comment thread packages/material_ui/lib/src/reorderable_list.dart Outdated
Comment thread packages/material_ui/lib/src/scrollbar.dart Outdated
Comment thread packages/cupertino_ui/lib/src/sheet.dart Outdated
Comment thread packages/material_ui/lib/src/scaffold.dart Outdated

@dkwingsmt dkwingsmt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Great solution!

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 22, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 23, 2026
@auto-submit

auto-submit Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/packages/12274, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@Piinks

Piinks commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Oo interesting scenario here. We enabled batch release for these packages, and removed the publish_to: none, but now we're failing repo checks for not bumping the version. @justinmc do you know the right steps to land things now?

@chunhtai

Copy link
Copy Markdown
Contributor

the repo check is failing because it expects a change log entry in https://github.com/flutter/packages/tree/main/packages/cupertino_ui/pending_changelogs

just copy the template file and fill in the detail, same for material_ui package.

For example this one in go_router https://github.com/flutter/packages/blob/main/packages/go_router/pending_changelogs/change_2026_06_07_1780787180781.yaml

@Piinks

Piinks commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Gotcha, thanks @chunhtai! Can you document the process and check it in to the repo for reference?

@chunhtai

Copy link
Copy Markdown
Contributor

the process is documented in https://github.com/flutter/flutter/tree/master/docs/ecosystem/release#batch-release

The error message in repo_check seems to be a bit confusing, let me update that

@Piinks

Piinks commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Gotcha, thanks!

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 28, 2026

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

/// An iOS-style activity indicator that spins clockwise.
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=AENVH-ZqKDQ}
/// Learn more about [CupertinoActivityIndicator] on the [Flutter YouTube channel](https://www.youtube.com/watch?v=AENVH-ZqKDQ).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that will be replaced with an embedded video in the future when it's supported? I guess we can find these by searching for the youtube URL in the codebase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! Filed dart-lang/pub-dev#9490 to see if @youtube can be supported

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm making a note to check in next Monday and see if this gets released as expected!

/// the [NavigationDestination] is focused, hovered, or pressed.
final WidgetStateProperty<Color?>? overlayColor;

//// The text style of the label.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 28, 2026
@auto-submit

auto-submit Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/packages/12274, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 28, 2026
@auto-submit
auto-submit Bot merged commit e6b99e0 into flutter:main Jul 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: cupertino_ui p: material_ui triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants